<template>
  <div class="app-container container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane :label="label1" name="first">
      </el-tab-pane>
      <el-tab-pane :label="label2" name="second">
      </el-tab-pane>
    </el-tabs>
    <div>
      <div class="date-types">
        <pull-new-view v-if="activeName == 'first'"></pull-new-view>
        <pull-new-order-view v-if="activeName == 'second'"></pull-new-order-view>
      </div>
    </div>

  </div>

</template>
<script>
import { listPullNewRule } from "@/api/marketing/pullnew.js";

import pullNewView from './pullNewView'
import pullNewOrderView from './pullNewOrderView'
export default {
  components: { pullNewView, pullNewOrderView },
  data() {
    return {
      activeName: 'first',
      label1: '',
      label2: '',

    };
  },
  created() {
    this.PullNewRule();
  },
  methods: {
    handleClick(tab, event) {
    },

    PullNewRule() {
      this.loading = true;
      listPullNewRule().then((response) => {
        let data = response.data;
        this.label1 = data.goldInput + '天内新客户开户并入金';
        this.label2 = data.succTransaction + '天内新用户完成一笔竞购订单'

        // this.content = '入金天数:' + data.goldInput + '天 \n' + ' 订单完成:' + data.succTransaction + '单'
        // this.content.replace(/(\n|\r|\r\n|↵)/g, '<br/>')
      });
    },
  }


};
  </script>